import request from '@/utils/request'

const api_name = '/admin/hosp/hospital'
const dict_name = '/admin/cmn/dict'


export default {
  //医院列表
  getHospList(page, limit, searchObj) {
    return request({
      url: `${api_name}/list/${page}/${limit}`,
      method: 'get',
      params: searchObj
    })
  },
  //根据dictCode查询所有子节点
  findByDictCode(dictCode) {
    return request({
      url: `${dict_name}/findByDictCode/${dictCode}`,
      method: 'get'
    })
  },
  //根据数据id查询子数据列表
  findChildId(id) {
    return request({
      url: `${dict_name}/findChildData/${id}`,
      method: 'get'
    })
  },
  updateStatus(id,status) {
    return request({
      url: `${api_name}/updateHospStatus/${id}/${status}`,
      method: 'get'
    })
  },
}